1. Field of the Invention
The present invention relates to image processing apparatuses, image processing methods, storage media, and programs for performing gray-scale conversion of images, and more particularly, it relates to an image processing apparatus, an image processing method, a storage medium, and a program for compositely changing the dynamic range of an image and converting the gray-scale of the image or for easily converting the shape of a gray-scale conversion curve.
2. Description of the Related Art
Due to recent advances in digital technology, radiographic images may now be converted into digital image signals (hereinafter the value of a pixel forming the digital image signal is referred to as a pixel value). These digital image signals are subjected to image processing, and the processed digital image signals are displayed on cathode-ray tube (CRT) displays or output onto film. When a radiographic image is captured, a digital image signal obtained by converting the radiographic image is generally subjected to gray-scale conversion in order to make the digital image signal suitable for display on a CRT display or to be output onto film. Also, the digital image signal may be subjected to dynamic range compression in order to make the digital image signal suitable on a CRT display or to be output onto film.
Several conventional methods are used to perform such dynamic range compression. One method is described in SPIE Vol. 626, Medicine XIV/PACSIV (1986). The method is expressed by equation (1):SD=A[Sorg−SUS]+B[SUS]+C  (1)where SD is a pixel value after processing. Sorg is an original pixel value (input pixel value). SUS is a pixel value of a low-frequency image of an original image (input image), and A, B, and C are constants (for example, A=3, and B=0.7). In this method, different weights can be assigned to a high frequency component (first term) and a low frequency component (second term). For example, when A=3 and B=0.7, the high frequency component is enhanced, and the overall dynamic range is compressed. It has been determined that an image processed by this method is advantageous over an unprocessed image when conducting diagnosis.
In Japanese Patent No. 2509503, another method expressed by equation (2):SD=Sorg+F(G(Px, Py))  (2)is described, where SD is a pixel value after processing, Sorg is an original pixel value (input pixel value), and Px and Py are average profiles of a plurality of X-direction and Y-direction profiles, respectively, of an original image (input image).
The characteristics of the function F(x) will now be described. When X>Dth, then F(x)=0. When 0≦x≦Dth, then F(x) monotonically decreases from an intercept E with a slope E/Dth. This can be expressed by equation (3):F(x)=E−(E/Dth)x  (3)Py=(ΣPyi)/n  (4)Px=(ΣPxi)/n  (5)where (i=1 to n), and Pyi and Pxi are profiles. For example, G(Px, Py) can be expressed by:G(Px, Py)=max(Px, Py)  (6)With this method, a density range in which the pixel value of a low-frequency image is less than or equal to Dth is compressed.
Another method similar to that described in Japanese Patent No. 2509503 is a method described in Anan et al., Journal of the Japanese Society of Radiological Technology, vol. 45, no. 8, p. 1030 (August 1989). This method can be expressed by equation (7):SD=Sorg+f(SUS)  (7)SUS=Σ Sorg/M2  (8)where SD is a pixel value after processing, Sorg is an original pixel value (input pixel value), SUS is an average pixel value obtained by computing a moving average of pixels within a mask of size M×M pixels of an original image (input image), and f(X) is a monotonically decreasing function. The method differs from equation (2) in the method of generating a low-frequency image. In equation (2), a low-frequency image is generated from one-dimensional data. In contrast, this method generates a low-frequency image from two-dimensional data. Similarly, with this method, a density range in which the pixel value of a low-frequency image is less than or equal to Dth is compressed.
In Japanese Patent No. 2663189, still another method is described, which is expressed by equation (9):SD=Sorg+f1(SUS)  (9)SUS=Σ Sorg/M2  (10)where SD is a pixel value after processing, Sorg is an original pixel value (input pixel value), SUS is an average pixel value obtained by computing a moving average of pixels within a mask of size M×M pixels of an original image (input image), and f1(X) is a monotonically increasing function.
The characteristics of the function f1(x) will now be described. When x<Dth, then f1(x)=0. When Dth≦x, then f1(x) monotonically decreases from an intercept E with a slope E/Dth. This can be expressed by:f1(x)=E−(E/Dth)x  (11)This method compresses a density greater than or equal to the pixel value Dth of a low-frequency image. The algorithm for this method is effectively the same as that described in Anan et al., Journal of the Japanese Society of Radiological Technology, vol. 45, no. 8, p. 1030 (August 1989).
These dynamic range compression methods are suitable for adjusting the amplitude of a low-frequency image and are thus regarded as methods for performing gray-scale conversion of a low-frequency component.
It is common for an image, after being subjected to dynamic range compression, to be subsequently subjected to gray-scale conversion. In this case, gray-scale conversion is performed in accordance with the following gray-scale conversion equation:Y=F(X)  (12)where Y is a pixel value of a gray-scale-converted image and X is a pixel value of an original image. A function F( ) for describing the relationship between the digital image X and the gray-scale-converted image Y is referred to as a gray-scale conversion curve. The function F( ) which describes the gray-scale conversion curve is expressed by the following equation (13):
                    Y        =                              a                          b              +                              c                ×                                  exp                  ⁡                                      (                                          d                      ×                                              (                                                  X                          -                          e                                                )                                                              )                                                                                +          f                                    (        13        )            where a, b, c, d, e, and f are parameters for defining the gray-scale conversion curve. In a known image processing apparatus, the shape (such as the slope) of the gray-scale conversion curve is changed by adjusting these parameters.
In the gray-scale-converted image, there are demands for enhancing the contrast of an image region in a target region or changing the gray-scale so that the overall image of an object can be easily observed on a CRT display or on film. It is thus preferable that the shape (such as the slope) of the gray-scale conversion curve be adjustable in accordance with the type, characteristic, or pixel-value range of an object image.
In a known image processing apparatus, gray-scale conversion and dynamic range compression are regarded as independent processes. This is often problematic for an operator to know how the effect of dynamic range compression is reflected in a gray-scale-converted image. Therefore, it is difficult to adjust the parameters of dynamic range compression while taking into consideration gray-scale conversion.
Further, when an image is subjected to frequency processing using a moving average, artifacts such as overshooting may be generated in edge portions.
Still further, in a known image processing apparatus, the shape of a gray-scale conversion curve can be changed by adjusting a plurality of parameters describing the gray-scale conversion curve. It is thus not easy to generate a target curve. For example, in equation (13), it is necessary to appropriately adjust the parameters a, b, c, d, e, and f, and thus it is not easy to adjust the shape of the gray-scale conversion curve. And, even when the parameters are adjusted, the shape (such as the slope) of the gray-scale conversion curve relative to a specific density or pixel-value range may not be set as desired.